package com.cskaoyan.javase.oop3._1interface._4example.model;

/**
 * 商品类
 *
 * @since 11:16
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class Goods {
    // ID是唯一性标识,每个商品id唯一
    private int id;
    private String name;
    private double price;
    private String brand;

    public int getId() {
        return id;
    }

    public Goods(int id, String name, double price, String brand) {
        this.id = id;
        this.name = name;
        this.price = price;
        this.brand = brand;
    }

    // 展示商品信息的方法
    public void printGoods() {
        System.out.println("商品的id是" + id + ",名字是" + name + ",价格是" + price + ",品牌是" + brand);
    }
}
